<script setup >
import { onMounted, ref } from 'vue';
import Son from './components/Son.vue';

const sonRef = ref(null)

// onMounted(() => {
//   sonRef.value.sayHi()
// })

const say = () => {
  sonRef.value.sayHi()
}
</script>

<template>
  <h1>我是vue3</h1>
  <Son ref="sonRef"></Son>
  <button @click="say">点我sayHi</button>
</template>

